3.139 \(\int \frac{a+b \tan ^{-1}(c x)}{x^2 (d+e x)} \, dx\)

Optimal. Leaf size=232 \[ -\frac{i b e \text{PolyLog}(2,-i c x)}{2 d^2}+\frac{i b e \text{PolyLog}(2,i c x)}{2 d^2}+\frac{i b e \text{PolyLog}\left (2,1-\frac{2}{1-i c x}\right )}{2 d^2}-\frac{i b e \text{PolyLog}\left (2,1-\frac{2 c (d+e x)}{(1-i c x) (c d+i e)}\right )}{2 d^2}-\frac{e \log \left (\frac{2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{d^2}+\frac{e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(1-i c x) (c d+i e)}\right )}{d^2}-\frac{a+b \tan ^{-1}(c x)}{d x}-\frac{a e \log (x)}{d^2}-\frac{b c \log \left (c^2 x^2+1\right )}{2 d}+\frac{b c \log (x)}{d} \]

[Out]

-((a + b*ArcTan[c*x])/(d*x)) + (b*c*Log[x])/d - (a*e*Log[x])/d^2 - (e*(a + b*ArcTan[c*x])*Log[2/(1 - I*c*x)])/
d^2 + (e*(a + b*ArcTan[c*x])*Log[(2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/d^2 - (b*c*Log[1 + c^2*x^2])/(2*d
) - ((I/2)*b*e*PolyLog[2, (-I)*c*x])/d^2 + ((I/2)*b*e*PolyLog[2, I*c*x])/d^2 + ((I/2)*b*e*PolyLog[2, 1 - 2/(1
- I*c*x)])/d^2 - ((I/2)*b*e*PolyLog[2, 1 - (2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/d^2

________________________________________________________________________________________

Rubi [A]  time = 0.241335, antiderivative size = 232, normalized size of antiderivative = 1., number of steps used = 14, number of rules used = 12, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.632, Rules used = {4876, 4852, 266, 36, 29, 31, 4848, 2391, 4856, 2402, 2315, 2447} \[ -\frac{i b e \text{PolyLog}(2,-i c x)}{2 d^2}+\frac{i b e \text{PolyLog}(2,i c x)}{2 d^2}+\frac{i b e \text{PolyLog}\left (2,1-\frac{2}{1-i c x}\right )}{2 d^2}-\frac{i b e \text{PolyLog}\left (2,1-\frac{2 c (d+e x)}{(1-i c x) (c d+i e)}\right )}{2 d^2}-\frac{e \log \left (\frac{2}{1-i c x}\right ) \left (a+b \tan ^{-1}(c x)\right )}{d^2}+\frac{e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(1-i c x) (c d+i e)}\right )}{d^2}-\frac{a+b \tan ^{-1}(c x)}{d x}-\frac{a e \log (x)}{d^2}-\frac{b c \log \left (c^2 x^2+1\right )}{2 d}+\frac{b c \log (x)}{d} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTan[c*x])/(x^2*(d + e*x)),x]

[Out]

-((a + b*ArcTan[c*x])/(d*x)) + (b*c*Log[x])/d - (a*e*Log[x])/d^2 - (e*(a + b*ArcTan[c*x])*Log[2/(1 - I*c*x)])/
d^2 + (e*(a + b*ArcTan[c*x])*Log[(2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/d^2 - (b*c*Log[1 + c^2*x^2])/(2*d
) - ((I/2)*b*e*PolyLog[2, (-I)*c*x])/d^2 + ((I/2)*b*e*PolyLog[2, I*c*x])/d^2 + ((I/2)*b*e*PolyLog[2, 1 - 2/(1
- I*c*x)])/d^2 - ((I/2)*b*e*PolyLog[2, 1 - (2*c*(d + e*x))/((c*d + I*e)*(1 - I*c*x))])/d^2

Rule 4876

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Int[Ex
pandIntegrand[(a + b*ArcTan[c*x])^p, (f*x)^m*(d + e*x)^q, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[p,
 0] && IntegerQ[q] && (GtQ[q, 0] || NeQ[a, 0] || IntegerQ[m])

Rule 4852

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
n[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^
2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 4848

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (Dist[(I*b)/2, Int[Log[1 - I*c*x
]/x, x], x] - Dist[(I*b)/2, Int[Log[1 + I*c*x]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4856

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[((a + b*ArcTan[c*x])*Log[2/(1 -
 I*c*x)])/e, x] + (Dist[(b*c)/e, Int[Log[2/(1 - I*c*x)]/(1 + c^2*x^2), x], x] - Dist[(b*c)/e, Int[Log[(2*c*(d
+ e*x))/((c*d + I*e)*(1 - I*c*x))]/(1 + c^2*x^2), x], x] + Simp[((a + b*ArcTan[c*x])*Log[(2*c*(d + e*x))/((c*d
 + I*e)*(1 - I*c*x))])/e, x]) /; FreeQ[{a, b, c, d, e}, x] && NeQ[c^2*d^2 + e^2, 0]

Rule 2402

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> -Dist[e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2447

Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[(Pq^m*(1 - u))/D[u, x]]}, Simp[C*PolyLog[2, 1 - u
], x] /; FreeQ[C, x]] /; IntegerQ[m] && PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponen
ts[u, x][[2]], Expon[Pq, x]]

Rubi steps

\begin{align*} \int \frac{a+b \tan ^{-1}(c x)}{x^2 (d+e x)} \, dx &=\int \left (\frac{a+b \tan ^{-1}(c x)}{d x^2}-\frac{e \left (a+b \tan ^{-1}(c x)\right )}{d^2 x}+\frac{e^2 \left (a+b \tan ^{-1}(c x)\right )}{d^2 (d+e x)}\right ) \, dx\\ &=\frac{\int \frac{a+b \tan ^{-1}(c x)}{x^2} \, dx}{d}-\frac{e \int \frac{a+b \tan ^{-1}(c x)}{x} \, dx}{d^2}+\frac{e^2 \int \frac{a+b \tan ^{-1}(c x)}{d+e x} \, dx}{d^2}\\ &=-\frac{a+b \tan ^{-1}(c x)}{d x}-\frac{a e \log (x)}{d^2}-\frac{e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2}{1-i c x}\right )}{d^2}+\frac{e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{d^2}+\frac{(b c) \int \frac{1}{x \left (1+c^2 x^2\right )} \, dx}{d}-\frac{(i b e) \int \frac{\log (1-i c x)}{x} \, dx}{2 d^2}+\frac{(i b e) \int \frac{\log (1+i c x)}{x} \, dx}{2 d^2}+\frac{(b c e) \int \frac{\log \left (\frac{2}{1-i c x}\right )}{1+c^2 x^2} \, dx}{d^2}-\frac{(b c e) \int \frac{\log \left (\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{1+c^2 x^2} \, dx}{d^2}\\ &=-\frac{a+b \tan ^{-1}(c x)}{d x}-\frac{a e \log (x)}{d^2}-\frac{e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2}{1-i c x}\right )}{d^2}+\frac{e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{d^2}-\frac{i b e \text{Li}_2(-i c x)}{2 d^2}+\frac{i b e \text{Li}_2(i c x)}{2 d^2}-\frac{i b e \text{Li}_2\left (1-\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{2 d^2}+\frac{(b c) \operatorname{Subst}\left (\int \frac{1}{x \left (1+c^2 x\right )} \, dx,x,x^2\right )}{2 d}+\frac{(i b e) \operatorname{Subst}\left (\int \frac{\log (2 x)}{1-2 x} \, dx,x,\frac{1}{1-i c x}\right )}{d^2}\\ &=-\frac{a+b \tan ^{-1}(c x)}{d x}-\frac{a e \log (x)}{d^2}-\frac{e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2}{1-i c x}\right )}{d^2}+\frac{e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{d^2}-\frac{i b e \text{Li}_2(-i c x)}{2 d^2}+\frac{i b e \text{Li}_2(i c x)}{2 d^2}+\frac{i b e \text{Li}_2\left (1-\frac{2}{1-i c x}\right )}{2 d^2}-\frac{i b e \text{Li}_2\left (1-\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{2 d^2}+\frac{(b c) \operatorname{Subst}\left (\int \frac{1}{x} \, dx,x,x^2\right )}{2 d}-\frac{\left (b c^3\right ) \operatorname{Subst}\left (\int \frac{1}{1+c^2 x} \, dx,x,x^2\right )}{2 d}\\ &=-\frac{a+b \tan ^{-1}(c x)}{d x}+\frac{b c \log (x)}{d}-\frac{a e \log (x)}{d^2}-\frac{e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2}{1-i c x}\right )}{d^2}+\frac{e \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{d^2}-\frac{b c \log \left (1+c^2 x^2\right )}{2 d}-\frac{i b e \text{Li}_2(-i c x)}{2 d^2}+\frac{i b e \text{Li}_2(i c x)}{2 d^2}+\frac{i b e \text{Li}_2\left (1-\frac{2}{1-i c x}\right )}{2 d^2}-\frac{i b e \text{Li}_2\left (1-\frac{2 c (d+e x)}{(c d+i e) (1-i c x)}\right )}{2 d^2}\\ \end{align*}

Mathematica [A]  time = 0.141304, size = 223, normalized size = 0.96 \[ -\frac{-i b e x \text{PolyLog}\left (2,\frac{e (1-i c x)}{e+i c d}\right )+i b e x \text{PolyLog}\left (2,-\frac{e (c x-i)}{c d+i e}\right )+i b e x \text{PolyLog}(2,-i c x)-i b e x \text{PolyLog}(2,i c x)-2 a e x \log (d+e x)+2 a d+2 a e x \log (x)+b c d x \log \left (c^2 x^2+1\right )-i b e x \log (1-i c x) \log \left (\frac{c (d+e x)}{c d-i e}\right )+i b e x \log (1+i c x) \log \left (\frac{c (d+e x)}{c d+i e}\right )-2 b c d x \log (x)+2 b d \tan ^{-1}(c x)}{2 d^2 x} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[(a + b*ArcTan[c*x])/(x^2*(d + e*x)),x]

[Out]

-(2*a*d + 2*b*d*ArcTan[c*x] - 2*b*c*d*x*Log[x] + 2*a*e*x*Log[x] - 2*a*e*x*Log[d + e*x] - I*b*e*x*Log[1 - I*c*x
]*Log[(c*(d + e*x))/(c*d - I*e)] + I*b*e*x*Log[1 + I*c*x]*Log[(c*(d + e*x))/(c*d + I*e)] + b*c*d*x*Log[1 + c^2
*x^2] + I*b*e*x*PolyLog[2, (-I)*c*x] - I*b*e*x*PolyLog[2, I*c*x] - I*b*e*x*PolyLog[2, (e*(1 - I*c*x))/(I*c*d +
 e)] + I*b*e*x*PolyLog[2, -((e*(-I + c*x))/(c*d + I*e))])/(2*d^2*x)

________________________________________________________________________________________

Maple [A]  time = 0.07, size = 321, normalized size = 1.4 \begin{align*}{\frac{ae\ln \left ( ecx+dc \right ) }{{d}^{2}}}-{\frac{a}{dx}}-{\frac{ae\ln \left ( cx \right ) }{{d}^{2}}}+{\frac{b\arctan \left ( cx \right ) e\ln \left ( ecx+dc \right ) }{{d}^{2}}}-{\frac{b\arctan \left ( cx \right ) }{dx}}-{\frac{b\arctan \left ( cx \right ) e\ln \left ( cx \right ) }{{d}^{2}}}-{\frac{{\frac{i}{2}}be{\it dilog} \left ( 1+icx \right ) }{{d}^{2}}}+{\frac{{\frac{i}{2}}be{\it dilog} \left ( 1-icx \right ) }{{d}^{2}}}+{\frac{{\frac{i}{2}}be\ln \left ( cx \right ) \ln \left ( 1-icx \right ) }{{d}^{2}}}-{\frac{{\frac{i}{2}}be}{{d}^{2}}{\it dilog} \left ({\frac{ie+ecx}{ie-dc}} \right ) }-{\frac{bc\ln \left ({c}^{2}{x}^{2}+1 \right ) }{2\,d}}+{\frac{cb\ln \left ( cx \right ) }{d}}+{\frac{{\frac{i}{2}}be\ln \left ( ecx+dc \right ) }{{d}^{2}}\ln \left ({\frac{ie-ecx}{dc+ie}} \right ) }+{\frac{{\frac{i}{2}}be}{{d}^{2}}{\it dilog} \left ({\frac{ie-ecx}{dc+ie}} \right ) }-{\frac{{\frac{i}{2}}be\ln \left ( ecx+dc \right ) }{{d}^{2}}\ln \left ({\frac{ie+ecx}{ie-dc}} \right ) }-{\frac{{\frac{i}{2}}be\ln \left ( cx \right ) \ln \left ( 1+icx \right ) }{{d}^{2}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctan(c*x))/x^2/(e*x+d),x)

[Out]

a/d^2*e*ln(c*e*x+c*d)-a/d/x-a/d^2*e*ln(c*x)+b*arctan(c*x)/d^2*e*ln(c*e*x+c*d)-b*arctan(c*x)/d/x-b*arctan(c*x)/
d^2*e*ln(c*x)-1/2*I*b/d^2*e*dilog(1+I*c*x)+1/2*I*b/d^2*e*dilog(1-I*c*x)+1/2*I*b/d^2*e*ln(c*x)*ln(1-I*c*x)-1/2*
I*b/d^2*e*dilog((I*e+e*c*x)/(I*e-d*c))-1/2*b*c*ln(c^2*x^2+1)/d+c*b/d*ln(c*x)+1/2*I*b/d^2*e*ln(c*e*x+c*d)*ln((I
*e-e*c*x)/(d*c+I*e))+1/2*I*b/d^2*e*dilog((I*e-e*c*x)/(d*c+I*e))-1/2*I*b/d^2*e*ln(c*e*x+c*d)*ln((I*e+e*c*x)/(I*
e-d*c))-1/2*I*b/d^2*e*ln(c*x)*ln(1+I*c*x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} a{\left (\frac{e \log \left (e x + d\right )}{d^{2}} - \frac{e \log \left (x\right )}{d^{2}} - \frac{1}{d x}\right )} + 2 \, b \int \frac{\arctan \left (c x\right )}{2 \,{\left (e x^{3} + d x^{2}\right )}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/x^2/(e*x+d),x, algorithm="maxima")

[Out]

a*(e*log(e*x + d)/d^2 - e*log(x)/d^2 - 1/(d*x)) + 2*b*integrate(1/2*arctan(c*x)/(e*x^3 + d*x^2), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{b \arctan \left (c x\right ) + a}{e x^{3} + d x^{2}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/x^2/(e*x+d),x, algorithm="fricas")

[Out]

integral((b*arctan(c*x) + a)/(e*x^3 + d*x^2), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(c*x))/x**2/(e*x+d),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b \arctan \left (c x\right ) + a}{{\left (e x + d\right )} x^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/x^2/(e*x+d),x, algorithm="giac")

[Out]

integrate((b*arctan(c*x) + a)/((e*x + d)*x^2), x)